﻿using System.ComponentModel.DataAnnotations;

namespace Faser_Shop.Models.RequestModel
{
    public class ReduceShoppingCart
    {
        [Required(ErrorMessage = "购物车项目Id不能为空")]
        public int CartId { get; set; }

        /// <summary>
        /// 减少的数量
        /// </summary>
        /// <example>1</example>
        [Required(ErrorMessage = "减少数量不能为空")]
        [Range(1, int.MaxValue, ErrorMessage = "减少数量必须大于0")]
        public int ReduceQuantity { get; set; } = 1;
    }
}